﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;
using ViewModels;
using System.Threading.Tasks;

namespace SinaWeiboApp_sl.Model
{
    public class User : ViewModelBase <User>
    {







        public string Id
        {
            get { return _IdContainerLocator(this).Value; }
            set { _IdContainerLocator(this).SetValueAndTryNotify(value); }
        }
        #region Property string Id Setup
        protected PropertyContainer<string> _Id;
        protected static Func<object, PropertyContainer<string>> _IdContainerLocator =
            RegisterContainerLocator<string>(
                "Id",
                model =>
                    model._Id =
                        model._Id
                        ??
                        new PropertyContainer<string>("Id"));
        #endregion










        public string Name
        {
            get { return _NameContainerLocator(this).Value; }
            set { _NameContainerLocator(this).SetValueAndTryNotify(value); }
        }
        #region Property string Name Setup
        protected PropertyContainer<string> _Name;
        protected static Func<object, PropertyContainer<string>> _NameContainerLocator =
            RegisterContainerLocator<string>(
                "Name",
                model =>
                    model._Name =
                        model._Name
                        ??
                        new PropertyContainer<string>("Name"));
        #endregion






        public string Password
        {
            get { return _PasswordContainerLocator(this).Value; }
            set { _PasswordContainerLocator(this).SetValueAndTryNotify(value); }
        }
        #region Property string Password Setup
        protected PropertyContainer<string> _Password;
        protected static Func<object, PropertyContainer<string>> _PasswordContainerLocator =
            RegisterContainerLocator<string>(
                "Password",
                model =>
                    model._Password =
                        model._Password
                        ??
                        new PropertyContainer<string>("Password"));
        #endregion









        protected override System.Threading.Tasks.Task BeginInitActions()
        {
            return Task.Factory.StartNew(() => { });
        }

        protected override System.Threading.Tasks.Task EndInitActions()
        {
            return Task.Factory.StartNew(() => { });
        }
    }
}
